<!DOCTYPE html>
<html>
<head>
    {include file="layout:_meta" /}
</head>
<body>

<div class="layui-form" style="padding: 20px 30px 0 0;">
    <div class="layui-form-item">
        <label class="layui-form-label">系统设置</label>
        <div class="layui-input-block">
            {if condition="!isset($list.system)||$list.system==1"}
            <input type="checkbox" lay-filter="system"  checked value="1" name="system" lay-skin="switch" lay-text="是|否">
            {else /}
            <input type="checkbox" lay-filter="system"  value="1" name="system" lay-skin="switch" lay-text="是|否">
            {/if}
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">分组标题</label>
        <div class="layui-input-block">
            <input type="text" name="title"  placeholder="分组标题、备注"  value="{:isset($list.title)?$list.title:''}" lay-reqtext="请输入分组标题" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">分组名</label>
        <div class="layui-input-block">
            <input type="text" name="name" value="{:isset($list.name)?$list.name:''}" placeholder="英文字符。不能和当前已有的重复"  lay-reqtext="请输入分组名"  class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-hide">
        <input type="hidden" name="id" value="{:isset($list['id'])?$list['id']:''}">
        <input type="button" lay-submit lay-filter="addEdit" id="addEdit" value="确认">
    </div>
</div>
{include file="layout:_footer" /}
<script>
    layui.use(['form'], function(){
        var form = layui.form;
        form.on('switch(system)', function(data){
            this.value = this.checked?1:0;
        });
    })
</script>
</body>
</html>
